package com.ruoyi.adapayRecordB.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.adapayRecordB.mapper.AdapayRecordBMapper;
import com.ruoyi.adapayRecordB.domain.AdapayRecordB;
import com.ruoyi.adapayRecordB.service.IAdapayRecordBService;

/**
 * 汇付支付商家支付记录Service业务层处理
 *
 * @author ch
 * @date 2022-03-11
 */
@Service
public class AdapayRecordBServiceImpl implements IAdapayRecordBService
{
    @Autowired
    private AdapayRecordBMapper adapayRecordBMapper;

    /**
     * 查询汇付支付商家支付记录
     *
     * @param id 汇付支付商家支付记录主键
     * @return 汇付支付商家支付记录
     */
    @Override
    public AdapayRecordB selectAdapayRecordBById(Long id)
    {
        return adapayRecordBMapper.selectAdapayRecordBById(id);
    }

    /**
     * 查询汇付支付商家支付记录列表
     *
     * @param adapayRecordB 汇付支付商家支付记录
     * @return 汇付支付商家支付记录
     */
    @Override
    public List<AdapayRecordB> selectAdapayRecordBList(AdapayRecordB adapayRecordB)
    {
        return adapayRecordBMapper.selectAdapayRecordBList(adapayRecordB);
    }

    /**
     * 新增汇付支付商家支付记录
     *
     * @param adapayRecordB 汇付支付商家支付记录
     * @return 结果
     */
    @Override
    public int insertAdapayRecordB(AdapayRecordB adapayRecordB)
    {
        adapayRecordB.setCreateTime(DateUtils.getNowDate());
        return adapayRecordBMapper.insertAdapayRecordB(adapayRecordB);
    }

    /**
     * 修改汇付支付商家支付记录
     *
     * @param adapayRecordB 汇付支付商家支付记录
     * @return 结果
     */
    @Override
    public int updateAdapayRecordB(AdapayRecordB adapayRecordB)
    {
        adapayRecordB.setUpdateTime(DateUtils.getNowDate());
        return adapayRecordBMapper.updateAdapayRecordB(adapayRecordB);
    }

    /**
     * 批量删除汇付支付商家支付记录
     *
     * @param ids 需要删除的汇付支付商家支付记录主键
     * @return 结果
     */
    @Override
    public int deleteAdapayRecordBByIds(Long[] ids)
    {
        return adapayRecordBMapper.deleteAdapayRecordBByIds(ids);
    }


    /**
     * 批量逻辑删除汇付支付商家支付记录
     *
     * @param ids 需要删除的汇付支付商家支付记录主键
     * @return 结果
     */
    @Override
    public int logicDeleteAdapayRecordB(Long[] ids,String delType,Long delUser)
    {
        return adapayRecordBMapper.logicDeleteAdapayRecordB(ids,delType,delUser);
    }

    /**
     * 删除汇付支付商家支付记录信息
     *
     * @param id 汇付支付商家支付记录主键
     * @return 结果
     */
    @Override
    public int deleteAdapayRecordBById(Long id)
    {
        return adapayRecordBMapper.deleteAdapayRecordBById(id);
    }
}
